#include "dds_data_receiver.h"
#include <string>
#include <iostream>
#include "dds_topic_header.h"
#include "dc_util.h"


using namespace DcAdr;

DDSDataReceiver::DDSDataReceiver()
{

}

DDSDataReceiver::~DDSDataReceiver()
{

}

int DDSDataReceiver::init()
{
#ifdef BUILD_FOR_C3B
    //中间变量topic
    for (const std::string &topicStr : dds_topic_list)
    {
        m_subscribe = new DDSTopicSubScribe();
        std::string ddsTopicName = "";
        ddsTopicName = DcAdr::Util::stringReplace(topicStr, ".", "__");
        ddsTopicName = DcAdr::Util::stringReplace(ddsTopicName, "-", "____");
        m_subscribe->init(ddsTopicName);
    }
#endif
    return 0;
}